//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.app.util;

import java.nio.charset.Charset;

public class StringUtils {
    public StringUtils() {
    }

    private static byte[] getBytes(String string, Charset charset) {
        return string == null ? null : string.getBytes(charset);
    }

    public static byte[] getBytesUtf8(String string) {
        return getBytes(string, Charset.forName("UTF-8"));
    }

    private static String newString(byte[] bytes, Charset charset) {
        return bytes == null ? null : new String(bytes, charset);
    }

    public static String newStringUsAscii(byte[] bytes) {
        return newString(bytes, Charset.forName("US-ASCII"));
    }

    public static String newStringUtf8(byte[] bytes) {
        return newString(bytes, Charset.forName("UTF-8"));
    }
}
